* image.c: Integer and memory overflow fixes.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 00:23:08 +0000 (17:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 00:23:08 +0000 (17:23 -0700)
commit2428a65d99b1dde2bf71210ede0427fa5e1ff719
tree78b86606d3b3862f3d2e057ae72b4610db555a68
parent3d2d157cfb41c979b186255b601a8d9820a86d78
* image.c: Integer and memory overflow fixes.

(RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these are duplicate
now that they've been promoted to lisp.h.
(x_allocate_bitmap_record, x_alloc_image_color)
(make_image_cache, cache_image, xpm_load):
Don't update size until alloc is done.
(xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
(x_detect_edges):
Check for size calculation overflow.
(ct_colors_allocated_max): New constant.
(x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
overflow.
src/ChangeLog
src/image.c